package main

import "fmt"

type person struct {
	name string
	age  int
}

func (p person) isOlderThan(q person) bool {
	return p.age > q.age
}

func main() {
	zhansan := person{
		"zhangsan", 14,
	}

	lisi := person{
		"lisi", 13,
	}

	wangwu := person{
		"wangwu", 15,
	}

	yongerThanzhangsan := zhansan.isOlderThan

	fmt.Printf("lisi is younger than zhangsan:%v\n", yongerThanzhangsan(lisi))
	fmt.Printf("wangwu is younger than zhangsan:%v\n", yongerThanzhangsan(wangwu))
}
